import { useState, useEffect } from "react";
import { useAppSelector } from ".";

/**
 * 根据设备类型获取值
 * @param values 
 * @returns 
 */
export const useGetValueByDeviceType = <V = any,>(values: [V, V][]) => {
  const {
    off: {
      isPc
    }
  } = useAppSelector((state) => state);
  return values.map(vlaue => vlaue[isPc ? 0 : 1])
}